import request from '@/utils/request'

// 查询预约排期列表
export function listSlApointForm(query) {
  return request({
    url: '/projects/SlApointForm/list',
    method: 'get',
    params: query
  })
}

// 查询预约排期详细
export function getSlApointForm(apointId) {
  return request({
    url: '/projects/SlApointForm/' + apointId,
    method: 'get'
  })
}

// 新增预约排期
export function addSlApointForm(data, config = {}) {
  console.log('data:+',data);
  return request({
    url: '/projects/SlApointForm',
    method: 'post',
    data: data,
    ...config
  })
}

// 修改预约排期
export function updateSlApointForm(data) {
  return request({
    url: '/projects/SlApointForm',
    method: 'put',
    data: data
  })
}

// 删除预约排期
export function delSlApointForm(apointId) {
  return request({
    url: '/projects/SlApointForm/' + apointId,
    method: 'delete'
  })
}

/**
 *获取已预约时间段列表根据日期
 * @returns
 */
export function getAppointTime(data){
  console.log('data:',data);
  return request({
    url: '/projects/SlApointForm/getApointFormInfo',
    method: 'post',
    data:data
  })
}

export function  getProductOptions() {
  return request({
    url: '/projects/SlProduct/getProductOptions',
    method: 'get',
  })
}
